<!DOCTYPE html>
<html lang="en">
<head>
	
	<!-- start: Meta -->
	<meta charset="utf-8">
	<title>Bootstrap Metro Dashboard by Dennis Ji for ARM demo</title>
	<!-- end: Meta -->
	
	<!-- start: Mobile Specific -->
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- end: Mobile Specific -->

	<!-- start: CSS -->
	<link id="bootstrap-style" href="__STATIC__/assets/css/bootstrap.min.css" rel="stylesheet">
	<link href="__STATIC__/assets/css/bootstrap-responsive.min.css" rel="stylesheet">
	<link id="base-style" href="__STATIC__/assets/css/style.css" rel="stylesheet">
	<link id="base-style-responsive" href="__STATIC__/assets/css/style-responsive.css" rel="stylesheet">
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,latin-ext' rel='stylesheet' type='text/css'>
	<!-- end: CSS -->
		
	<!-- start: Favicon -->
	<link rel="shortcut icon" href="__STATIC__/assets/img/favicon.ico">
	<!-- end: Favicon -->
	
</head>

<body>
	{include file="public:header"/}
	
		<div class="container-fluid-full">
		<div class="row-fluid">
				
			{include file="public:sidemenu"/}
			
			<!-- 正文导航条 -->
			<div id="content" class="span10">	
				<ul class="breadcrumb">
					<li>
						<i class="icon-home"></i>
						<a href="{:url('community/index')}">Home</a> 
						<i class="icon-angle-right"></i>
					</li>
					<li><a href="#">修改帖子信息</a></li>
				</ul>			
			<!-- 正文 -->
			<!-- 正文 -->
				<div class="row-fluid sortable">
				<div class="box span12">
					<div class="box-header" data-original-title>
						<h2><i class="halflings-icon white edit"></i><span class="break"></span>>修改帖子信息</h2>
						<div class="box-icon">
							<a href="#" class="btn-setting"><i class="halflings-icon white wrench"></i></a>
							<a href="#" class="btn-minimize"><i class="halflings-icon white chevron-up"></i></a>
							<a href="#" class="btn-close"><i class="halflings-icon white remove"></i></a>
						</div>
					</div>
					<div class="box-content">
						<form class="form-horizontal" method="post" action="{:url('edit')}" enctype="multipart/form-data">
							<input type="hidden" name="postid" value="{$post.post_id}">
							
						  <fieldset>
							
							
							<div class="control-group">
								<label class="control-label" for="selectError3">所属城市</label>
								<div class="controls">
								  <select id="selectError3" name="city">
								  	{volist name="citylist" id="vo"}
									<option value="{$vo.city_id}" 
									{if condition="$vo.city_id==$post.city_id"} selected="selected" {/if}>
									{$vo.city_name}
									</option>
									{/volist}
								  </select>
								</div>
							</div>

							<div class="control-group">
								<label class="control-label" for="selectError3">所属社区</label>
								<div class="controls">
								  <select id="selectError3" name="community">
								  	{volist name="communitylist" id="vo"}
									<option value="{$vo.community_id}"
									{if condition="$vo.community_id==$post.community_id"} selected="selected" {/if}>
									{$vo.community_name}
									</option>
									{/volist}
								  </select>
								</div>
							</div>

							<div class="control-group">
								<label class="control-label" for="focusedInput">标题</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="focusedInput" type="text" name="title" value="{$post.post_title}">
								</div>
							</div>
							
							<div class="control-group hidden-phone">
							  <label class="control-label" for="textarea2">正文</label>
							  <div class="controls">
								<textarea class="cleditor" id="textarea2" rows="3" name="content">{$post.post_content}</textarea>
							  </div>
							</div>
							
							<div class="form-actions">
							  <button type="submit" class="btn btn-primary">提交</button>
							  <button type="reset" class="btn">取消</button>
							</div>

						  </fieldset>
						</form>   

					</div>
				</div><!--/span-->

			</div><!--/row-->
			<!-- 正文 -->
			<!-- 正文 -->
			</div>
			<!-- 正文导航条 -->

		</div><!--/#content.span10-->
		</div><!--/fluid-row-->
		
	{include file="public:footer"/}
	
</body>
<script type="text/javascript">  
            function getFileUrl(sourceId) {  
                var url;  
                if (navigator.userAgent.indexOf("MSIE")>=1) { // IE  
                    url = document.getElementById(sourceId).value;  
                } else if(navigator.userAgent.indexOf("Firefox")>0) { // Firefox  
                    url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));  
                } else if(navigator.userAgent.indexOf("Chrome")>0) { // Chrome  
                    url = window.URL.createObjectURL(document.getElementById(sourceId).files.item(0));  
                }  
                return url;  
            }  
            function preImg(sourceId, targetId) {   
                var url = getFileUrl(sourceId);   
                var imgPre = document.getElementById(targetId);   
                imgPre.src = url;   
            }   
    </script>
</html>
